using FlyIL.Expression;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static FlyIL.AssemblerRegisters;
using static FlyIL.OperandMaker;

namespace FlyIL.Trace.Tests
{



    [TestClass()]
    public class 追踪_需要合并的情况
    {

        [TestMethod]
        public void test1()
        {
            var vcontext = new Context(true, 0);

            vcontext.Make().mov(R1D, 123);
            vcontext.Make().mov(R1L, _byte_[R6D]);
            vcontext.Make().mov(R1H, _byte_[R6D + 1]);

            vcontext.Make().mov(R3D, R1D);

            var exp = vcontext.TraceStrict(vcontext.Last, ref vcontext.Last.O1);
            var simp = exp.Copy();
            simp.Simplify();

            Assert.AreEqual(exp.CalcDepth, 1);

        }


    }

}